#include <bits/stdc++.h>
using namespace std;
int min_coin(int money,vector<int>& coin_value)
{
    int count = 0;
    for(auto iter = coin_value.rbegin();iter!=coin_value.rend();iter++)
    {
        int curren_money = *iter;
        if(curren_money<=money)
        {
            if(curren_money!=0)
            {
                count += money/curren_money;
                money %= curren_money;
            } else
                break;
        }
    }
    return count;
}

int main()
{
    int money = 130;
    vector<int> coin = {1,2,5,10,20,50,100};

    cout<<min_coin(money,coin);
    return 0;
}
